import { axiosGet, axiosPost, axiosPut, axiosDelete } from '/@/api/RequestBase';

import { BasEnum } from './dto/BasEnum';
import { BasEnumInput } from './dto/BasEnumInput';
export type { BasEnum, BasEnumInput };

const service = 'basEnum/'; // 要写后面的斜杠, 不要写前面的斜杠

export const BasEnumApi = {
	all: () => {
		return axiosPost(service + 'all', {}) as Promise<BasEnum[]>;
	},
	getByType: (data: BasEnumInput) => {
		return axiosPost(service + 'getByType', data) as Promise<[]>;
	},
	getZhanDian: () => {
		return axiosPost(service + 'getZhanDian', {}) as Promise<[BasEnum]>;
	},
	add: (data: BasEnum) => {
		return axiosPost(service + 'add', data) as Promise<BasEnum>;
	},
	update: (data: BasEnum) => {
		return axiosPost(service + 'update', data) as Promise<boolean>;
	},
};

// export const queryNoPaged = (data: any) => {
// 	if (data === undefined) {
// 	  data = {};
// 	}
// 	return axiosPost("sysEnumBtms/queryNoPaged", data);
//   };

//   export const save = (data: any) => {
// 	let re = axiosPost("sysEnumBtms/save", data);
// 	refreshStore();
// 	return re;
//   };

//   export const getById = (id: string) => {
// 	return axiosPost("sysEnumBtms/getById", { id });
//   };

//   export const queryPaged = (data: any) => {
// 	return axiosPost("sysEnumBtms/queryPaged", data);
//   };
